using UnityEngine;
using System.Collections;

public class Movimento : MonoBehaviour {
	
	public static bool PodeAndar = true;
	public GUIText instrucoes;
	private float cronometro = 0;
	
	void Update () 
	{
		cronometro += Time.deltaTime;
		
		if(cronometro >= 5)
		{
			Destroy(instrucoes);
		}
		
		if(PodeAndar)
		{
			if(Input.GetKey("w"))
			{
				transform.Translate(0,0,0.3f);
			}
	
			if(Input.GetKey("s"))
			{
				transform.Translate(0,0,-0.3f);
			}
	
			if(Input.GetKey("a"))
			{
				transform.Rotate(0,-1f,0);
			}
	
			if(Input.GetKey("d"))
			{
				transform.Rotate(0,1f,0);
			}
		}
		
	}	
}
